package com.zmj.sy.mom.srv.aps.bean.entity.order;

import com.baomidou.mybatisplus.annotation.TableName;
import com.zmj.sy.mom.srv.aps.bean.entity.base.BaseEntity;
import com.zmj.sy.mom.srv.aps.utils.Comment;
import lombok.Getter;
import lombok.Setter;

import java.math.BigDecimal;
import java.time.LocalDateTime;

@Comment("APS的工单详情")
@Getter
@Setter
@TableName("tb_aps_work_detail")
public class ApsWorkDetail extends BaseEntity {

    @Comment("总订单ID")
    private Integer orderId;

    @Comment("APS订单ID")
    private Integer apsOrderId;

    @Comment("工序表的ID")
    private Integer phaseId;

    @Comment("PLM_ID")
    private String plmId;

    @Comment("工单Id")
    private Integer apsWorkOrderId;

    @Comment("工单Pid")
    private Integer apsWorkOrderPid;

    @Comment("工作组ID")
    private Integer stationGroupId;

    @Comment("工位ID")
    private Integer stationId;

    @Comment("工作组ID")
    private Integer groupId;

    @Comment("单件工时秒")
    private Integer workTime;

    @Comment("总工时 = [(实动工时 + 间隔时间） * 总数量 + 转入时间 + 转出时间] / 工作能力")
    private Integer totalWorkTime;

    @Comment("转入标准工时 秒")
    private Integer enterTime;

    @Comment("转出标准工时 秒")
    private Integer outTime;

    @Comment("间隔标准工时 秒")
    private Integer changTime;

    @Comment("工序顺序")
    private Integer phaseSeq;

    @Comment("工序名称")
    private String phaseName;

    @Comment("工序编号")
    private String phaseCode;

    @Comment("物料编号")
    private String materNo;

    @Comment("物料名称")
    private String materName;

    @Comment("工作组编号")
    private String groupCode;

    @Comment("单件数量")
    private BigDecimal partCount;

    @Comment("此详情需要做的数量")
    private BigDecimal totalCount;

    @Comment("处理中的数量")
    private BigDecimal processCount;

    @Comment("完工数量")
    private BigDecimal finishCount;

    @Comment("工单状态 1未启用 2未开工 3开工中 4已完成  5 订单关闭")
    private Integer status;

    @Comment("工单顺序")
    private Integer detailSeq;

    @Comment("计划开始时间")
    private LocalDateTime planStartDateTime;

    @Comment("计划完成时间")
    private LocalDateTime planEndDateTime;

    @Comment("实际开始时间")
    private LocalDateTime actualStartDateTime;

    @Comment("实际结束时间")
    private LocalDateTime actualEndDateTime;

    @Comment("倒排的ID")
    private Integer reverseDetailId;

    @Comment("订单导入类型 1ERP 2MBD")
    private Integer orderType;

    @Comment("明细类型 1钢板 2 零组件 ")
    private Integer type;

    @Comment("唯一号")
    private String uniqueCode;

    @Comment("是否为后期添加 null和1否 2是")
    private Integer appendFlag;

    @Comment("ERP的工序工作中心")
    private String opCode;

    @Comment("ERP的工序")
    private String op;

}
